package com.kun.desensitized.handler.impl;

import cn.hutool.core.util.DesensitizedUtil;
import com.google.auto.service.AutoService;
import com.kun.desensitized.handler.DesensitizedHandler;
import com.kun.enums.DesensitizedEnums;


@AutoService(DesensitizedHandler.class)
public class ChineseNameDesensitizedHandler implements DesensitizedHandler {
    @Override
    public boolean supportType(DesensitizedEnums desensitizedEnums) {
        return DesensitizedEnums.CHINESE_NAME.equals(desensitizedEnums);
    }

    @Override
    public String getDesensitizedValue(String value) {
        return DesensitizedUtil.chineseName(value);
    }
}
